Previous Book Contents Book Index Next

Inside Macintosh: Open Transport /
Chapter 3 - Endpoints / Endpoints Reference
Functions / Obtaining Information About an Endpoint


OTSync

Ensures that the endpoint provider and the client have the same information about an endpoint's state.

C INTERFACE
OTResult OTSync(EndpointRef ref);
C++ INTERFACE
OTResult TEndpoint::Sync();
PARAMETERS
ref
The endpoint reference of the endpoint whose state information is being synchronized.
DESCRIPTION
The provider's and the client's knowledge about an endpoint's state might get out of sync if the provider and the client occupy different memory spaces. The current run-time environment does not support separate memory spaces; therefore, this function is currently provided so that existing XTI-based applications that make this call do not have to be modified.

If the OTSync function succeeds, it returns an integer value of 0 or greater that specifies the current state of the endpoint, as follows:

      T_UNINIT    = 0
      T_UNBND     = 1
      T_IDLE      = 2
      T_OUTCON    = 3
      T_INCON     = 4
      T_DATAXFER  = 5
      T_OUTREL    = 6
      T_INREL     = 7   
If the OTSync function fails, it returns a negative integer corresponding to a result code.

If a notifier is not installed and the endpoint is in asynchronous mode, it is not possible to determine when the OTSync function completes.

COMPLETION EVENT CODES
T_SYNCCOMPLETE0x2000000BThe OTSync function has completed. The cookie parameter of the notifier function is meaningless.
VALID STATES
All

SEE ALSO
If you are simply interested in obtaining information about the state of an endpoint, call the OTGetEndpointState function (page 3-83).


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 AUG 1996